package com.wgt.observer;

/**
 * 名为Octal的观察者
 * Created by wgt on 2017/6/14.
 */
public class OctalObserver extends Observer {

    public OctalObserver(Subject subject) {
        this.subject = subject;

        subject.attach(this);

    }

    @Override
    public void update() {
        System.out.println( "Octal String: "
                + Integer.toBinaryString( subject.getStatus() ) );
    }
}
